/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package beans.util;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;
import javax.inject.Named;

/**
 *
 * @author riccardo
 */
@ManagedBean
@SessionScoped
@Named(value = "travelId")

public class TravelId {

    /**
     * Creates a new instance of TravelId
     */
    public TravelId() {
                this.ID = (String) FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("idViaggio");
                System.out.println("buonasera"+ID);
    }
    
    
    private String ID;

    public void update(){
             this.ID = (String) FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("idViaggio");
                             System.out.println("sono stato aggiornato"+ID);

    }
    public String getID() {
        System.out.println("vedi che ritorno "+ ID);
        return ID;
    }

    public void setID(String ID) {
        this.ID = ID;
    }
}
